import request from '@/utils/request'

export function login(data) {
  // return new Promise((resolve) => {
  //   resolve({
  //     code: 200,
  //     data: {
  //       token: 'dfasfiok',
  //       user: { role: 2,username: '阿牛但是' }
  //     }
  //   })
  // })
  return request({
    url: 'user/login',
    method: 'post',
    data
  })
}
export function getMapJson() {
  return request({
    url: '/admin/address',
    method: 'get'
  })
}
export function updateUser(data) {
  return request({
    url: '/admin/user/update-password',
    method: 'post',
    data
  })
}
